import { defineConfig } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [reactRefresh()],
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        // antd主题色自定义
        modifyVars: { '@primary-color': '#ff6611' },
      },
    },
  },
  resolve: {
    alias: {
      '@/': `${path.resolve(__dirname, 'lib')}/`,
      '@/*': `${path.resolve(__dirname, 'lib/*')}/`,
    },
  },
});
